package cn.sofwin.sb;

import cn.sofwin.sb.di.Computer;
import cn.sofwin.sb.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AnnotationDemo {
    public static void main(String[] args) {
        ApplicationContext act=new AnnotationConfigApplicationContext(AppConfig.class);
        User user=act.getBean(User.class);
        System.out.println(user);

        Computer computer=act.getBean(Computer.class);
        System.out.println(computer);
    }
}
